﻿using System.Diagnostics.Contracts;
using System.Reactive.Concurrency;

namespace System.Reactive.Linq
{
	public static partial class Observable
	{
		public static IObservable<TResult> If<TResult>(Func<bool> condition, IObservable<TResult> thenSource)
		{
			Contract.Requires(condition != null, null, "condition != null");
			Contract.Requires(thenSource != null, null, "thenSource != null");
			Contract.Ensures(Contract.Result<IObservable<TResult>>() != null, null, "Contract.Result<IObservable<TResult>>() != null");
			return null;
		}

		public static IObservable<TResult> If<TResult>(Func<bool> condition, IObservable<TResult> thenSource, IObservable<TResult> elseSource)
		{
			Contract.Requires(condition != null, null, "condition != null");
			Contract.Requires(thenSource != null, null, "thenSource != null");
			Contract.Requires(elseSource != null, null, "elseSource != null");
			Contract.Ensures(Contract.Result<IObservable<TResult>>() != null, null, "Contract.Result<IObservable<TResult>>() != null");
			return null;
		}

		public static IObservable<TResult> If<TResult>(Func<bool> condition, IObservable<TResult> thenSource, IScheduler scheduler)
		{
			Contract.Requires(condition != null, null, "condition != null");
			Contract.Requires(thenSource != null, null, "thenSource != null");
			Contract.Requires(scheduler != null, null, "scheduler != null");
			Contract.Ensures(Contract.Result<IObservable<TResult>>() != null, null, "Contract.Result<IObservable<TResult>>() != null");
			return null;
		}

		public static IObservable<TSource> IgnoreElements<TSource>(this IObservable<TSource> source)
		{
			Contract.Requires(source != null, null, "source != null");
			Contract.Ensures(Contract.Result<IObservable<TSource>>() != null, null, "Contract.Result<IObservable<TSource>>() != null");
			return null;
		}

		public static IObservable<long> Interval(TimeSpan period)
		{
			Contract.Ensures(Contract.Result<IObservable<long>>() != null, null, "Contract.Result<IObservable<long>>() != null");
			return null;
		}

		public static IObservable<long> Interval(TimeSpan period, IScheduler scheduler)
		{
			Contract.Requires(scheduler != null, null, "scheduler != null");
			Contract.Ensures(Contract.Result<IObservable<long>>() != null, null, "Contract.Result<IObservable<long>>() != null");
			return null;
		}

		public static IObservable<bool> IsEmpty<TSource>(this IObservable<TSource> source)
		{
			Contract.Requires(source != null, null, "source != null");
			Contract.Ensures(Contract.Result<IObservable<bool>>() != null, null, "Contract.Result<IObservable<bool>>() != null");
			return null;
		}
	}
}